#!/bin/sh
#name:Change admin password
#desc:Change admin password
#package:distro
#type:multiple

UID=`cat /etc/opendomo/uid`

if test -z "$1"
then
	echo "#> Change admin password to all opendomo agents"
	echo "form:`basename $0`"
	echo "	opass	Old admin password	text	opendomo"
	echo "	npass	New admin password	text	opendomo"
else
	R=`usermm "$1" set 'admin' "$2"`
	if test -z "$R"
	then
		echo "#INFO: Password changed [($UID)]"
	else
		echo "#ERR Error, password can not be changed [($UID)]"
	fi
fi

echo
